package com.lrkj.framework.websocket.dao;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class PageResult<T> implements Serializable {
    private static final long serialVersionUID = 9142640042556747848L;
    protected static int DEFAULT_PAGE_SIZE = 20;
    private long currentIndex = 0L;
    private long totalCount = 0L;
    private int currentPage = 1;
    private int totalPage = 0;
    private int pageSize;
    private List<T> content;

    public PageResult() {
        this.pageSize = DEFAULT_PAGE_SIZE;
        this.content = new ArrayList(0);
    }

    public long getCurrentIndex() {
        return this.currentIndex;
    }

    public void setCurrentIndex(long currentIndex) {
        this.currentIndex = currentIndex;
    }

    public long getTotalCount() {
        return this.totalCount;
    }

    public void setTotalCount(long totalCount) {
        this.totalCount = totalCount;
    }

    public int getCurrentPage() {
        return this.currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public int getTotalPage() {
        return this.totalPage;
    }

    public void setTotalPage(int countPage) {
        this.totalPage = countPage;
    }

    public int getPageSize() {
        return this.pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public List<T> getContent() {
        return this.content;
    }

    public void setContent(List<T> content) {
        if (content == null) {
            this.content = new ArrayList(0);
        } else {
            this.content = content;
        }

    }
}
